package com.zhiyou.app.pojo.bo;

import cn.hutool.extra.spring.SpringUtil;
import com.zhiyou.app.pojo.entity.UserEntity;
import com.zhiyou.app.pojo.enums.UserTypeEnum;
import com.zhiyou.app.service.IUserService;
import lombok.Data;

@Data
public class LoginUser {
    private Integer userId;
    private UserTypeEnum type;

    public UserEntity getUserEntity() {
        IUserService userService = SpringUtil.getBean(IUserService.class);
        return userService.getById(userId);
    }
}
